﻿@{
    ViewBag.Title = "RoleTarge";
    Layout = "~/Views/Shared/_Main.cshtml";
}

<script type="text/javascript" src="/Res/MyJs.js"></script>
<script type="text/javascript" src="../"></script>

<style type="text/css">
    .CompeMain
    {
        width: 500px;
        border: lightskyblue 1px solid;
    }
    .Competop
    {
        width: 100%;
        height: 60px;
    }
    .Compeleft
    {
        width: 100%;
        height: 400px;
        float: left;
        border: lightskyblue 1px solid;
        overflow-y: scroll;
    }
</style>
<script type="text/javascript">
    $(function () {
        var id = window.location.href;
        if (id.indexOf("?") > -1) {
            id = id.split("?")[1];
            if (id.indexOf("=") > -1) {
                id = id.split("=")[1];
            }
        }
        $.post("/SysRole/RoleTargeView/?id=" + encodeURI(id), function (res) {
            $("#selectView").append(res);
        });
    });

    function SaveDate() {
        var id = window.location.href;
        if (id.indexOf("?") > -1) {
            id = id.split("?")[1];
            if (id.indexOf("=") > -1) {
                id = id.split("=")[1];
            }
        }
        $.post("/SysRole/SaveRoleTarge?id="+encodeURI(id), { query: jv.GetDivJson($("#selectView")) }, function (res) {
            alert(res);
        });
    }
</script>

<div class="CompeMain">
    <div class="Competop">
        <table style="width: 100%">
            <tr>
                <td style="width: 30%; text-align: left">
                    对接系统列表
                </td>
                <td style="width: 70%; text-align: right">
                    <input type="button" value="保存" onclick="SaveDate()" />
                    <input type="button" value="关闭" />
                </td>
            </tr>
        </table>
    </div>
    <div class="Compeleft">
         <table id="selectView" width="500px" class="table_border" border="0" cellpadding="0"
                cellspacing="0">
                <tr class="table_head">
                    <td width="25">
                        <input id="select_All" type="checkbox" onclick="select_All();" />
                    </td>
                    <td>
                        对接系统名称
                    </td>
                    <td>
                        对接系统编码
                    </td>
                </tr>
            </table>
    </div>

</div>

